﻿using System.Web;
using Grishko.SerilizeTools;
using Grishko.DataTier.SqlSentence;
using OutdoorLib.BaseEntity.Face;
using OutdoorLib.BaseEntity.Infrastructure;

namespace OutdoorLib.BaseEntity.Filters
{
    /// <summary>
    /// Список сотрудников 
    /// </summary>
    [TagNameInfo(TagName = "CotactFaceListFilter")]
    public class CotactFaceListFilter : Filter
    {

        public class CotactFaceEngine : ScriptEngine
        {
            public CotactFaceEngine(ScriptEngine.TScriptEngineSrchInfo Settings) : base(Settings) { }

        }

        public override string ObjectPageKey
        {
            get
            {
                return "PageKey_ContactFaceEditor";
            }
        }

        public CotactFaceListFilter()
        {
            ScriptEngine.TScriptEngineSrchInfo Settings = new ScriptEngine.TScriptEngineSrchInfo();
            Settings.EntityType = typeof(ContactFace);
            Settings.SqlFunction = "GetContactFaceObjectPropertyStorage()";
            Settings.PropertyCollection.Add("Client/Организация", typeof(OutdoorLib.BaseEntity.Face.Client));
            Settings.BanProperties = new string[] { "ContactFaces" };
            Where = new CotactFaceEngine(Settings);
        }
    }
}